#ifndef USERMANAGER_H
#define USERMANAGER_H
#include <QFile>
#include <QDir>
#include "Structures.h"
#include<QApplication>
class UserManager
{
public:

    vector<User> users;
    void readUser();
    void writeUser();
    UserManager()
    {

        //readUser();
    }
    ~UserManager()
    {
        //writeUser();
    }
    void readTable(string username);
    void writeTable(string username);
    QStringList readAttri(string username,string tablename);
    void writeAttri(string username,string tablename);
    QVector<QStringList> readData(string username,string tablename);
    void writeData(string username,string tablename);
    void addUser(string username,string password);
    void deleteUser(string username);
    bool existUser(string username);
    User & getUser(string username);
    void modifyUser(string username,string password);
    void showAllUser();
};

#endif // USERMANAGER_H

